<form id="pagerForm" method="post" action="{:U($module_name.'/'.$action_name."?model=".$model)}">
    <input type="hidden" name="pageNum" value="{$pageNum}" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$orderDirection}" />
</form>
<div class="pageHeader">
    <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="{:U($module_name.'/'.$action_name)}" method="post">
        <div class="searchBar">
            <ul class="searchContent">
                <li style="width:200px;">
                <label style="width: 50px;">关键字：</label>
                <input type="text" name="keywords" value="{$keywords}"/>
                </li>
                <li style="width: 50px;">
                <select class="combox" name="sfield_name">
                    <option value="series" {if $sfield_name=="series"}selected="selected"{/if}>系列</option>
                    <option value="price" {if $sfield_name=="price"}selected="selected"{/if}>批发价</option>
                </select>
                </li>
                <li style="padding-top:0;"><div class="buttonActive"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
            </ul>
        </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="edit" href="{:U('Product/edit')}?id={pid_product}" target="navTab" rel"product_edit" warn="请选择一条数据"><span>修改</span></a></li>
            <li class="line">line</li>
            <li><a class="icon" href="javascript:$.printBox('w_list_print')"><span>打印</span></a></li>
        </ul>
    </div>
    <div id="w_list_print">
        <table class="list" width="100%" targetType="navTab" asc="asc" desc="desc" layoutH="94">
            <thead>
                <tr>
                    <th width="40" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>ID</th>
                    <th>名称</th>
                    <th>分类</th>
                    <th>品牌</th>
                    <th>供货商</th>
                    <th orderField="series" {if $orderField=='series'}class="{$orderDirection}"{/if}>系列</th>
                    <th orderField="price" {if $orderField=='price'}class="{$orderDirection}"{/if}>均价</th>
                    <th>状态</th>
                    <th orderField="write_date" {if $orderField=='write_date'}class="{$orderDirection}"{/if}>修改时间</th>
                    <th>详情</th>
                    <th width="120">管理操作</th>
                </tr>
            </thead>
            <tbody>
                <volist name="list" id="vo">
                <tr target="pid_product" rel="{$vo['id']}">
                    <td align="center">{$vo['id']}</td>
					<td>{$vo['description'][0]['name']}</td>
					<td><volist name="vo['category_tag']" id="vol">
							{$vol['name']}&nbsp;&nbsp;
						</volist>
						<a class="add" href="{:U('Category/add')}" target="dialog" width="600" height="380" title="添加分类"><span>+</span></a>
					</td>
					<td>{$vo['brand'][0]['name']}
						<a class="add" href="{:U('Brand/add')}" target="dialog" width="600" height="380" title="添加品牌"><span>+</span></a>
					</td>
					<td><volist name="vo['suppliers']" id="vol">
							{$vol['name']}&nbsp;&nbsp;
						</volist>
						<a class="add" href="{:U('Suppliers/add')}" target="dialog" width="600" height="380" title="添加供应商"><span>+</span></a>
					</td>
                    <td>{$vo['series']}</td>
                    <td>￥{$vo['price']}</td>
                    <td>{$vo['status']}</td>
                    <td>{$vo['write_date']|date="Y-m-d H:i:s",###}</td>
					<td><a class="btnEdit" href="{:U('Product/profile',array('id'=>$vo['id']))}" target="dialog" width="500" height="680" title="产品详情">产品详情</a></td>
                    <td>
						<a class="btnEdit" href="{:U('Product/attredit',array('cid'=>$_GET['cid'],'id'=>$vo['id']))}" target="dialog" width="500" height="680" title="添加属性">添加属性</a>
						<a class="btnEdit" href="{:U('Product/edit',array('cid'=>$_GET['cid'],'id'=>$vo['id']))}" target="navTab" title="编辑">修改</a>
						<a class="btnAttach" href="{:U('Product/photo?id='.$vo['id'])}" target="dialog" width="600" height="380"><span>上传图片</span></a>
						<a class="btnEdit" href="{:U('Product/img_list',array('id'=>$vo['id']))}" target="navTab" title="图片列表">图片列表</a>
					</td>
                </tr>
                </volist>
            </tbody>
        </table>
    </div>

    <div class="panelBar" >
        <div class="pages">
            <span>显示 </span>
            <select name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
                <option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
                <option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
                <option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
            </select>
            <span> 条，共 {$totalCount} 条</span>
        </div>

        <div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="{$pageNumShown}" currentPage="{$currentPage}"></div>

    </div>

</div>
<script type="text/javascript">
function dialogAjaxDone(json){$.pdialog.closeCurrent();}
</script>